ImagemapCDWARE applet
multi-threaded and double-buffered for your safety and convenience!
[CAFÉ]-[CREATORS]-[APPLETS]-[FAQ]-[RESOURCES]-[RULES]-[DOWNLOADING]
ImagemapCDWARE varies from ImagemapPLUS in that the ANIMATION parameters require two more numbers in the frame() field. These represent the width and height of the frames which may now be different than the width and height of the triggering area. (See below for details).
The version now available supports the URLFILE parameter (see below)
This applet implements an imagemap that, in addition to basic hotlinks, allows for animations, sounds, and external information windows to be spawned.
To use the applet one must download ImagemapCDWARE.class code and place it in the same directory as the .html document in which the applet is to appear.
NOTE: you will also need to download the following three classes which may also be found in the public ftp directory: TimerThread.class, SoundThread.class, and AnimThread.class.
Following is a list of all the parameter options which are currently applicable. Note that the 'name=' of the parameter as typed into the HTML document SHOULD BE CAPTILIZED... it is not necessary to capitalize the 'value' attributes. There are two types of parameters used in ImagemapCDWARE: the area parameters and other parameters. Note that all delimiters are the '|' symbol.
area parameters
Area parameters come in four different types (URL, ANIMATION, SOUND, and INFO), each with its own specifications. In addition to the basic name, one should append a number to the name (e.g.: SOUND0, ANIMATION4, etc). The first of a type should always be type0... the second of that type would be type1... and so forth. Areas may overlay in any combination with lower enumerations having precedence.
name = URL#
value = x | y | w | h | url
x and y are the upper left corner of the 'hot area'. w and h are the width and height of the area respectively, and url is the destination link (you must include the string 'http://').
Alternately, ImagemapCDWARE applet allows you to 'point' to an existing NCSA .map file. This can save you the trouble of having to put in all the URL# parameters above. Only 'rect' areas are supported (and 'default'). Simply use:
param name=URLFILE value=filename-with-directory-path
Note that URL# and URLFILE parameters are exclusive... you may not use both (the URLFILE will take priority).
name = ANIMATION#
value = trigger | x | y | w | h | frame(fw|fh|file|x0|y0|x1|y1|..|..) | pause(v0|v1|..) | position(x0|y0|x1|y1|..)
trigger may have one of five values: cont, enter, click, entercont, clickcont. cont means the animation will play conituously, regardly of the mouse position. enter causes the animation 'loop' to play once each time the mouse is moved inside the animation area (as defined by x,y,w,h next). click triggers the animation for one loop when the mouse is clicked inside the area. entercont is like enter, but the animation continues to loop while the mouse is in the area (as opposed to stopping after one loop). clickcont causes the animation to start until the mouse is clicked back in the area.
x,y,w, and h define the trigger area for the animation.
frame(fw|fh|file|x0|y0|x1|y1|..|..) establishes what image is to be cut up into the individual frames of animation for that animation area. fw and fh are the width and height of all the frames to be cut from the imagestrip (they are assumed to be the same size, but this width and height may be different that the width and height of the triggering area (w and h). file should give the image file name (along with relative directory path), while the x's and y's indicate the upper left corner of each frame to be cut out of the file image (width and height of the frames are previously defined by w and h). This part of the parameter also tells the applet how many frames there are (by counting the number of upper left corners indicated). Note that all of this frame information is nested inside the notation frame(....).
pause(v0|v1|..) is an optional part of this parameter. Each value indicates how many tenths of a second that animation frame should be displayed. The default is 1. Values may be omitted for any frame (with a double pipe '||') in which case the default of 1 is used. The v's should be nested within the notation pause(...).
position(x0|y0|x1|y1|..|..) is another optional part of the parameter which will cause the animation to display in an area different than that of the trigger area (previously defined by x,y,w, and h). The x's and y's here indicate the upper left corner of the area where the animation should be displayed. Note that while you may let each frame be in a different position, the old frames are not automatically erased... so you could get images 'scattered' about. Any positions not explicitly defined are defaulted to the previous frame position. If position(...) is not used... all frames are defaulted to the trigger area.
name = SOUND#
value = trigger | x | y | w | h | file
trigger may be either enter or click and indicate, obviously, how the sound is activated. x,y,w, and h define the area that triggers the sound. file indicates the sound file (along with relative directory path).
name = INFO#
value = " trigger | x | y | w | h | window title | window message "
trigger may be either enter or click and indicate, obviously, how the external window is activated. x,y,w, and h define the area that triggers the window. window title is self explanatory, and window message is the message to appear in the window. Within the message the backslash \ character is used to indicate a 'new-line'. Note that you should put this parameter's value with double quotes in case there are spaces in either the window's title or message.
other parameters
These are the more basic parameters.
BGCOLOR indicates a background color to paint behind any back or foreground images which may have transparency. The value should be three numbers value=r|g|b from 0-255 indicating the RGB value of the background.
BACKGROUND's value is an image (with directory path) which will appear under any frames of animation.
FOREGROUND's value is an image (with directory path) which will appear above any frames of animation.
All of these 'other' parameters are optional.
special keys
Any time the mouse is inside the applet window, you may type certain pre-defined keys to do certain actions:
- 'h' displays a help window that lists out these special keys.
- 'x' closes the external window.
- 'a' highlights all ANIMATION areas in blue.
- 'u' highlights all URL areas in yellow.
- 's' highlights all SOUND areas in red.
- 'i' highlights all INFO areas in green.
- 'e' jumps the browser to my (Eric Harshbarger's) homepage.
- 'c' jumps the browser to the Café del Sol homepage.
comments & notes
A few things I'll say to try to head of FAQs (tho e-mail is encouraged).
- DO NOT ask me about targeting Netscape Frames. I will get around to it when I feel like it. I personally abhor the use of frames, but a lot of requests have been made in the past, so I'll put it on my list.
- Transparent frames of animation will look goofy since old frames are not automatically cleared. I will work around that eventually.
[CAFÉ]-[CREATORS]-[APPLETS]-[FAQ]-[RESOURCES]-[RULES]-[DOWNLOADING]
-- Comments and suggestions are welcome: harshec@cdware.eng.sun.com, address Eric Harshbarger
The ImagemapCDWARE applet may be used freely by anyone. Neither Sun Microsystems' nor Eric C. Harshbarger is responsible for any problems resulting from the malfunction or misuse of this applet.
© Copyright 1996, Sun Microsystems